const dictData = [
  {
    id: '32',
    dictKey: 'COMMSTATUS',
    itemValue: 1,
    itemName: '是',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '34',
    dictKey: 'NORMALSTATUS',
    itemValue: '0',
    itemName: '是',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '404',
    dictKey: 'CANVASCOLORTYPE',
    itemValue: 'black_white',
    itemName: '黑白',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '424',
    dictKey: 'OVERLAPRULETYPE',
    itemValue: '1',
    itemName: '颜色优先',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '426',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_TEXT',
    itemName: '文本组件',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '438',
    dictKey: 'CANVASHALIGNTYPE',
    itemValue: 'left',
    itemName: '左对齐',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '441',
    dictKey: 'CANVASVALIGNTYPE',
    itemValue: 'top',
    itemName: '顶部对齐',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '444',
    dictKey: 'CANVASFONTSTYLE',
    itemValue: 'bold',
    itemName: '粗体',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '449',
    dictKey: 'NUMBERSIZETYPE',
    itemValue: 'super',
    itemName: '数字上标',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '451',
    dictKey: 'DIAGONALTYPE',
    itemValue: 'MAJOR',
    itemName: '左上-右下',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '456',
    dictKey: 'CANVASTIMETYPE',
    itemValue: 'Hms',
    itemName: '24小时制',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '458',
    dictKey: 'CANVASDATETYPE',
    itemValue: 'YMD',
    itemName: '年月日',
    isSys: null,
    sequence: '1',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '33',
    dictKey: 'COMMSTATUS',
    itemValue: 2,
    itemName: '否',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '35',
    dictKey: 'NORMALSTATUS',
    itemValue: '1',
    itemName: '否',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '405',
    dictKey: 'CANVASCOLORTYPE',
    itemValue: 'black_white_red',
    itemName: '黑白红',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '467',
    dictKey: 'CANVASCOLORTYPE',
    itemValue: 'black_white_red_yellow',
    itemName: '黑白红黄',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '468',
    dictKey: 'CANVASCOLORTYPE',
    itemValue: 'black_white_red_yellow_blue_green',
    itemName: '黑白红黄蓝绿',
    isSys: null,
    sequence: '4',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '425',
    dictKey: 'OVERLAPRULETYPE',
    itemValue: '2',
    itemName: '顺序优先',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '427',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_NUMBER',
    itemName: '数字组件',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '439',
    dictKey: 'CANVASHALIGNTYPE',
    itemValue: 'center',
    itemName: '居中对齐',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '442',
    dictKey: 'CANVASVALIGNTYPE',
    itemValue: 'center',
    itemName: '居中对齐',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '445',
    dictKey: 'CANVASFONTSTYLE',
    itemValue: 'italic',
    itemName: '斜体',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '450',
    dictKey: 'NUMBERSIZETYPE',
    itemValue: 'sub',
    itemName: '数字下标',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '452',
    dictKey: 'DIAGONALTYPE',
    itemValue: 'MINOR',
    itemName: '左下-右上',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '457',
    dictKey: 'CANVASTIMETYPE',
    itemValue: 'hms',
    itemName: '12小时制',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '459',
    dictKey: 'CANVASDATETYPE',
    itemValue: 'MDY',
    itemName: '月日年',
    isSys: null,
    sequence: '2',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '406',
    dictKey: 'CANVASCOLORTYPE',
    itemValue: 'black_white_yellow',
    itemName: '黑白黄',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '428',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_BARCODE',
    itemName: '条形码组件',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '440',
    dictKey: 'CANVASHALIGNTYPE',
    itemValue: 'right',
    itemName: '右对齐',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '443',
    dictKey: 'CANVASVALIGNTYPE',
    itemValue: 'bottom',
    itemName: '底部对齐',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '446',
    dictKey: 'CANVASFONTSTYLE',
    itemValue: 'underline',
    itemName: '下划线',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '453',
    dictKey: 'DIAGONALTYPE',
    itemValue: 'BOTH',
    itemName: '双对角线',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '460',
    dictKey: 'CANVASDATETYPE',
    itemValue: 'DMY',
    itemName: '日月年',
    isSys: null,
    sequence: '3',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '429',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_QRCODE',
    itemName: '二维码组件',
    isSys: null,
    sequence: '4',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '447',
    dictKey: 'CANVASFONTSTYLE',
    itemValue: 'strikethrough',
    itemName: '删除线',
    isSys: null,
    sequence: '4',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '454',
    dictKey: 'DIAGONALTYPE',
    itemValue: 'VERTICAL',
    itemName: '垂直线',
    isSys: null,
    sequence: '4',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '430',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_IMAGE',
    itemName: '图片组件',
    isSys: null,
    sequence: '5',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '448',
    dictKey: 'CANVASFONTSTYLE',
    itemValue: 'none',
    itemName: '无',
    isSys: null,
    sequence: '5',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '455',
    dictKey: 'DIAGONALTYPE',
    itemValue: 'HORIZONTAL',
    itemName: '水平线',
    isSys: null,
    sequence: '5',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '431',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_LINE',
    itemName: '直线组件',
    isSys: null,
    sequence: '6',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '432',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_DATE',
    itemName: '日期组件',
    isSys: null,
    sequence: '7',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '433',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_TIME',
    itemName: '时间组件',
    isSys: null,
    sequence: '8',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '434',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_RANK',
    itemName: '评级组件',
    isSys: null,
    sequence: '9',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '435',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_ABORDER',
    itemName: '矩形组件',
    isSys: null,
    sequence: '10',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '436',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_BBORDER',
    itemName: '圆角矩形组件',
    isSys: null,
    sequence: '11',
    itemColor: null,
    itemIcon: null
  },
  {
    id: '437',
    dictKey: 'CANVASASSEMBLYTYPE',
    itemValue: 'CONTENT_TYPE_CBORDER',
    itemName: '圆形组件',
    isSys: null,
    sequence: '12',
    itemColor: null,
    itemIcon: null
  }
]

export const senseBody = [{ senseName: 'IOT_CANVAS_MODULE_FORM_DEFAULT', senseCode: '92MDBF', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_MODULE_TABLE_DEFAULT', senseCode: '92MDP6', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_FONT_DEFINE_TABLE_ORG', senseCode: 'K75LBL', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_TABLE_DEFAULT', senseCode: '2OAQBA', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_ASSEMBLY_TABLE_DEFAULT', senseCode: '4LQ6VO', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_BLOCK_TABLE_DEFAULT', senseCode: '3ILNH5', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_FONT_TABLE_DEFAULT', senseCode: 'GNB49Q', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_FONT_DEFINE_TABLE_DEFAULT', senseCode: 'K75LFN', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_PAGE_TABLE_DEFAULT', senseCode: 'GLU5P5', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_SIZE_TABLE_DEFAULT', senseCode: 'AMJNKS', baseUrl: 'canvasapi' }, { senseName: 'IOT_PROD_CATELOG_TABLE_DEFAULT', senseCode: 'ZPD7DH', baseUrl: 'appinkapi' }, { senseName: 'IOT_CANVAS_FORM_DEFAULT', senseCode: '2OAQZT', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_ASSEMBLY_FORM_DEFAULT', senseCode: '4LQ6O9', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_BLOCK_FORM_DEFAULT', senseCode: '3ILN29', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_FONT_FORM_DEFAULT', senseCode: 'GNB4J2', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_FONT_DEFINE_FORM_DEFAULT', senseCode: 'K75LP5', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_PAGE_FORM_DEFAULT', senseCode: 'GLU5TJ', baseUrl: 'canvasapi' }, { senseName: 'IOT_CANVAS_SIZE_FORM_DEFAULT', senseCode: 'AMJN7I', baseUrl: 'canvasapi' }, { senseName: 'IOT_PROD_CATELOG_FORM_DEFAULT', senseCode: 'ZPD7X5', baseUrl: 'appinkapi' }]
export const getSense = (senseKey) => {
  const foundItem = senseBody.find(item => item.senseName === senseKey)
  return foundItem ? foundItem.senseCode : ''
}
export const getDictListForKey = (key) => {
  return dictData.filter((v) => v.dictKey === key)
}
export const getDictForValue = (key, value) => {
  const list = getDictListForKey(key)
  return list.find(v => v.itemValue === value).itemName
}

export const isTrueForDict = (value) => {
  return value === 1
}
